home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Topik / Topik - Disk 36 - Archivers (19xx)(Topik Public Domain)(PD)[WB].zip / Topik - Disk 36 - Archivers (19xx)(Topik Public Domain)(PD)[WB].adf / Arc / Arc.doc < prev    next >
Text File  |  1990-10-07  |  20KB  |  580 lines

  1.  
  2. *** TOPIK Note: Arc is here in this directory, use it from the CLI or Shell.
  3.  *
  4.  *
  5.  
  6.                                   ARC
  7.  
  8.                          File Archive Utility
  9.  
  10.  
  11. (C) COPYRIGHT 1985 by System Enhancement Associates; ALL RIGHTS RESERVED
  12.  
  13.  
  14. This file describes the ARC file utility, version 4.3, which was
  15. created by System Enhancement Associates on 22 August 1985.
  16.  
  17. ARC is the copyrighted property of System Enhancement Associates.  You
  18. are granted a limited license to use ARC, and to copy it and
  19. distribute it, provided that the following conditions are met:
  20.  
  21. 1)  No fee may be charged for such copying and distribution.
  22.  
  23. 2)  ARC may ONLY be distributed in its original, unmodified state.
  24.  
  25.  
  26. Any voluntary contributions for the use of this program will be
  27. appreciated, and should be sent to:
  28.  
  29.                      System Enhancement Associates
  30.                              21 New Street
  31.                            Wayne, NJ   07470
  32.  
  33. If you are using ARC in a commercial environment, then the
  34. contribution is not voluntary.
  35.  
  36.  
  37. A word about user supported software:
  38.  
  39. The user supported software concept (usually referred to as
  40. "freeware") is an attempt to provide software at low cost.  The cost
  41. of offering a new product by conventional channels is staggering, and
  42. hence dissuades many independant authors and small companies from
  43. developing and promoting their ideas.  User supported software is an
  44. attempt to develop a new marketing channel, where products can be
  45. introduced at low cost.
  46.  
  47. If user supported software works, then everyone will benefit.  The
  48. user will benefit by receiving quality products at low cost, and by
  49. being able to "test drive" software thoroughly before purchasing it.
  50. The author benefits by being able to enter the commercial software
  51. arena without first needing large sources of venture capital.
  52.  
  53. But it can only work with your support.  We're not just talking about
  54. ARC here, but about all user supported software.  If you find that you
  55. are still using a program after a couple of weeks, then pretty
  56. obviously it is worth something to you, and you should send in a
  57. contribution.
  58.  
  59.  
  60.  
  61. And now, back to ARC:
  62.  
  63. ARC is used to create and maintain file archives.  An archive is a
  64. group of files collected together into one file in such a way that the
  65. individual files may be recovered intact.
  66.  
  67. ARC is different from other archive and library utilities in that it
  68. automatically compresses the files being archived, so that the
  69. resulting archive takes up a minimum amount of space.
  70.  
  71. When ARC is used to add a file to an archive it analyzes the file to
  72. determine which of four storage methods will result in the greatest
  73. savings.  These four methods are:
  74.  
  75. 1)  No compression; the file is stored intact.
  76.  
  77. 2)  Repeated-character compression; repeated sequences of the same
  78.     byte value are collapsed into a three-byte code sequence.
  79.  
  80. 3)  Huffman squeezing; the file is compressed into variable length bit
  81.     strings, similar to the method used by the SQ programs.
  82.  
  83. 4)  Lempel-Zev compression;  the file is stored as a series of twelve
  84.     bit codes which represent character strings, and which are created
  85.     "on the fly".
  86.  
  87. Note that since one of the four methods involves no compression at
  88. all, the resulting archive entry will never be larger than the
  89. original file.
  90.  
  91.  
  92.  
  93.                                USING ARC
  94.                                =========
  95.  
  96. ARC is invoked with a command of the following format:
  97.  
  98.     ARC <x> <arcname> [<template> . . .]
  99.  
  100. Where:
  101.  
  102.     <x> is an ARC command letter (see below), in either upper or lower
  103.     case.
  104.  
  105.     <arcname> is the name of the archive to act on, with or without an
  106.     extension.  If no extension is supplied, then ".ARC" is assumed.
  107.     The archive name may include path and drive specifiers.
  108.  
  109.     <template> is one or more file name templates.  The "wildcard"
  110.     characters "*" and "?" may be used.  A file name template may only
  111.     include a path or drive specifier if you are adding a file to an
  112.     archive.
  113.  
  114. If ARC is invoked with no arguments (by typing "ARC", and pressing
  115. "enter"), then a brief command summary is displayed.
  116.  
  117.  
  118.                              ARC COMMANDS
  119.                              ============
  120.  
  121. Following is a brief summary of the available ARC commands:
  122.  
  123.     a,u = add files to archive
  124.     m   = move files to archive
  125.     d   = delete files from archive
  126.     x,e = extract files from archive
  127.     r   = run files from archive
  128.     p   = copy files from archive to stdout
  129.     l   = list files in archive
  130.     v   = verbose listing of files in archive
  131.     t   = test archive integrity
  132.     c   = convert entry to new packing method
  133.     b   = retain backup copy of archive
  134.     w   = suppress warning messages
  135.     n   = suppress notes and comments
  136.  
  137. These commands are explained in more detail below.
  138.  
  139.  
  140.  
  141. ADDING FILES
  142. ------------
  143.  
  144. Files are added to an archive using the "A" (Add), "U" (Update), or
  145. "M" (Move) commands.  Add and Update are identical.  Move differs in
  146. that the source file is deleted once it has been added to the archive.
  147.  
  148. For example, if you wish to add a file named "TEST.DAT" to an archive
  149. named "MY.ARC", you would use a command of the form:
  150.  
  151.     ARC a my test.dat
  152.  
  153. or:
  154.  
  155.     ARC u my.arc test.dat
  156.  
  157. If you wanted to move all files in your current directory into an
  158. archive named "SUM.ARC", you could use a command of the form:
  159.  
  160.     ARC m sum *.*
  161.  
  162. If you wanted to add all files with a ".C" extension, and all files
  163. named "STUFF" to an archive named "JUNK.ARC", you could type:
  164.  
  165.     ARC a junk *.c stuff.*
  166.  
  167. Archive entries are always maintained in alphabetic order.  Archive
  168. entries may not have duplicate names.  If you add a file to an archive
  169. that already contains a file by that name, then the existing entry in
  170. the archive is replaced.  Also, the archive itself and its backup will
  171. not be added.
  172.  
  173. You may also add a file which is in a directory other than your
  174. current directory.  For example, it is perfectly legal to type:
  175.  
  176.     ARC a junk c:\dustbin\stuff
  177.  
  178. The A, U, and M commands are the ONLY commands which allow you to give
  179. a drive or path.  Also, you cannot add two files with the same name.
  180. In other words, if you have a file named "C:\DUSTBIN\STUFF.TXT" and
  181. another file named "C:\BUCKET\STUFF.TXT", then typing:
  182.  
  183.     arc a junk c:\dustbin\*.* c:\bucket\*.*
  184.  
  185. will not work.
  186.  
  187.  
  188.  
  189. DELETING FILES
  190. --------------
  191.  
  192. Archive entries are deleted with the "D" (Delete) command.  For
  193. example, if you had an archive named "JUNK.ARC", and you wished to
  194. delete all entries in it with a filename extension of ".C", you could
  195. type:
  196.  
  197.     ARC d junk *.c
  198.  
  199.  
  200.  
  201. EXTRACTING FILES
  202. ----------------
  203.  
  204. Archive entries are extracted with the "E" (Extract) and "X" (eXtract)
  205. commands.  For example, if you had an archive named "JUNK.ARC", and
  206. you wanted all files in it with an extension of ".TXT" or ".DOC" to be
  207. recreated on your disk, you could type:
  208.  
  209.     ARC x junk *.txt *.doc
  210.  
  211. If you wanted to extract all of the files in an archive named
  212. "JUNK.ARC", you could simply type:
  213.  
  214.     ARC x junk
  215.  
  216. Whatever method of file compression was used in storing the files is
  217. reversed, and uncompressed copies are created in the current
  218. directory.
  219.  
  220.  
  221.  
  222. RUNNING FILES
  223. -------------
  224.  
  225. Archive entries may be run without being extracted by use of the "R"
  226. (Run) command.  For example, if you had an archive named "JUNK.ARC"
  227. which contained a file named "LEMON.COM", which you wished to run, you
  228. could type:
  229.  
  230.     ARC r junk lemon.com
  231.  
  232. You can run any file from an archive which has an extension of ".COM",
  233. ".EXE", or ".BAT".  You cannot run interpretive BASIC programs from an
  234. archive, nor can you give arguments to a program you are running from
  235. an archive.
  236.  
  237. In practice, the file to be run is extracted, run, and then deleted.
  238. All in all, this is a fairly useless command.
  239.  
  240.  
  241.  
  242. PRINTING FILES
  243. --------------
  244.  
  245. Archive entries may be examined with the "P" (Print) command.  This
  246. works the same as the Extract command, except that the files are not
  247. created on disk.  Instead, the contents of the files are written to
  248. standard output.  For example, if you wanted to see the contents of
  249. every ".TXT" file in an archive named "JUNK.ARC", but didn't want them
  250. saved on disk, you could type:
  251.  
  252.     ARC p junk *.txt
  253.  
  254. If you wanted them to be printed on your printer instead of on your
  255. screen, you could type:
  256.  
  257.     ARC p junk *.txt >prn
  258.  
  259.  
  260.  
  261. LISTING ARCHIVE ENTRIES
  262. -----------------------
  263.  
  264. You can obtain a list of the contents of an archive by using the "L"
  265. (List) command or the "V" (Verbose list) command.  For example, to see
  266. what is in an archive named "JUNK.ARC", you could type:
  267.  
  268.     ARC l junk
  269.  
  270. If you are only interested in files with an extension of ".DOC", then
  271. you could type:
  272.  
  273.     ARC l junk *.doc
  274.  
  275.  
  276. ARC prints a short listing of an archive's contents like this:
  277.  
  278.     Name          Length    Date
  279.     ============  ========  =========
  280.     ALPHA.TXT         6784  16 May 85
  281.     BRAVO.TXT         2432  16 May 85
  282.     COCO.TXT           256  16 May 85
  283.  
  284.  
  285. "Name" is simply the name of the file.
  286.  
  287. "Length" is the unpacked file length.  In other words, it is the
  288. number of bytes of disk space which the file would take up if it were
  289. extracted.
  290.  
  291. "Date" is the date on which the file had last been modified, as of the
  292. time when it was added to the archive.
  293.  
  294.  
  295. ARC prints a verbose listing of an archive's contents like this:
  296.  
  297.     Name          Length    Stowage    SF   Size now  Date       Time    CRC
  298.     ============  ========  ========  ====  ========  =========  ======  ====
  299.     ALPHA.TXT         6784  Squeezed   35%      4413  16 May 85  11:53a  8708
  300.     BRAVO.TXT         2432  Squeezed   41%      1438  16 May 85  11:53a  5BD6
  301.     COCO.TXT           256   Packed     5%       244  16 May 85  11:53a  3AFB
  302.  
  303.  
  304. "Name", "Length", and "Date" are the same as for a short listing.
  305.  
  306. "Stowage" is the compression method used.  The following compression
  307. methods are currently employed:
  308.  
  309.        --          No compression.
  310.      Packed        Runs of repeated byte values are collapsed.
  311.     Squeezed       Huffman squeeze technique employed.
  312.     Crunched       Lempel-Zev compression technique employed.
  313.  
  314. "SF" is the stowage factor.  In other words, it is the percentage of
  315. the file length which was saved by compression.
  316.  
  317. "Size now" is the number of bytes the file is occupying while in the
  318. archive.
  319.  
  320. "Time" is the time of last modification, and is associated with the
  321. date of last modification.
  322.  
  323. "CRC" is the CRC check value which has been stored with the file.
  324. Another CRC value will be calculated when the file is extracted or
  325. tested to ensure data integrity.  There is no especially good reason
  326. for displaying this value.
  327.  
  328.  
  329.  
  330. BACKUP RETENTION
  331. ----------------
  332.  
  333. When ARC adds or deletes archive entries it renames the original
  334. archive to give it an extension of ".BAK", and then creates a new
  335. archive with the desired changes.  If you wish to retain this original
  336. copy of the archive for backup purposes, then add the "B" (Backup)
  337. command to your other commands.
  338.  
  339. For example, if you wanted to delete all entries with an extension of
  340. ".DOC" from an archive named "JUNK.ARC", but you wanted to keep a copy
  341. around that still has them, then you could type:
  342.  
  343.     ARC bd junk *.doc
  344.  
  345. or:
  346.  
  347.     ARC db junk *.doc
  348.  
  349.  
  350.  
  351. MESSAGE SUPPRESION
  352. ------------------
  353.  
  354. ARC prints two types of messages, warnings and comments.
  355.  
  356. Warnings are messages about suspected error conditions, such as when a
  357. file to be extracted already exists, or when an extracted file fails
  358. the CRC error check.  Warnings may be suppressed by use of the "W"
  359. (Warn) command.  You should use this command sparingly.  In fact, you
  360. should probably not use this command at all.
  361.  
  362. Comments (or notes) are informative messages, such as naming each file
  363. as it is added to the archive.  Comments and notes may be suppressed
  364. by use of the "N" (Note) command.
  365.  
  366. For example, suppose you extracted all files with an extension of
  367. ".BAS" from an archive named "JUNK.ARC"  Then, after making some
  368. changes which you decide not to keep, you decide that you want to
  369. extract them all again, but you don't want to be asked to confirm
  370. every one.  In this case, you could type:
  371.  
  372.     ARC xw junk *.bas
  373.  
  374. Or, if you are going to add a hundred files with an extension of
  375. ".MSG" to an archive named "TRASH.ARC", and you don't want ARC to list
  376. them as it adds them, you could type:
  377.  
  378.     ARC an trash *.msg
  379.  
  380. Or, if you want to extract the entire contents of an archive named
  381. "JUNK.ARC", and you don't want to hear anything, then type:
  382.  
  383.     ARC xnw junk
  384.  
  385.  
  386.  
  387. TESTING AN ARCHIVE
  388. ------------------
  389.  
  390. The integrity of an archive may be tested by use of the "T" (Test)
  391. command.  This checks to make sure that all of the file headers are
  392. properly placed, and that all of the files are in good shape.
  393.  
  394. This can be very useful for critical archives, where data integrity
  395. must be assured.  When an archive is tested, all of the entries in the
  396. archive are unpacked (without saving them anywhere) so that a CRC
  397. check value may be calculated and compared with the recorded CRC
  398. value.
  399.  
  400. For example, if you just received an archive named "JUNK.ARC" over a
  401. phone line, and you want to make sure that you received it properly,
  402. you could type:
  403.  
  404.     ARC t junk
  405.  
  406. It defeats the purpose of the T command to combine it with N or W.
  407.  
  408.  
  409.  
  410. CONVERTING AN ARCHIVE
  411. ---------------------
  412.  
  413. The "C" (Convert) command is used to convert an archive entry to take
  414. advantage of newer compression techniques.  For example, if you had an
  415. archive named "JUNK.ARC", and you wanted to make sure that all files
  416. with an extension of ".DOC" were encoded using the very latest
  417. methods, you could type:
  418.  
  419.     ARC c junk *.doc
  420.  
  421. Or if you wanted to convert every file in the archive, you could type:
  422.  
  423.     ARC c junk
  424.  
  425.  
  426.  
  427.                              SPECIAL NOTES
  428.                              =============
  429.  
  430. Whenever ARC encounters a fatal error condition it leaves the original
  431. archive on disk, renamed to have an extension of ".BAK" (backup).
  432.  
  433. The function used to calculate the CRC check value in previous
  434. versions has been found to be in error.  It has been replaced in
  435. version 3.0 with a proper function.  ARC will still read archives
  436. created with earlier versions of ARC, but it will report a warning
  437. that the CRC value is in error.  All archives created prior to version
  438. 3.0 should be unpacked and repacked with the latest version of ARC.
  439.  
  440. Transmitting a file with XMODEM protocol rounds the size up to the
  441. next multiple of 128 bytes, adding garbage to the end of the file.
  442. This used to confuse ARC, causing it to think that the end of the
  443. archive was invalidly formatted.  This has been corrected in version
  444. 3.03.  Older archives may still be read, but ARC may report them to be
  445. improperly formatted.  All files can be extracted, and no data is
  446. lost.  In addition, ARC will automatically correct the problem when it
  447. is encountered.
  448.  
  449.  
  450.  
  451.                          CHANGES IN VERSION 4
  452.                          ====================
  453.  
  454. ARC is adding another data compression technique in this version.  We
  455. have been looking for some technique that could improve on Huffman
  456. squeezing in at least a few cases.  So far, Lempel-Zev compression
  457. seems to be fulfilling our fondest hopes, often acheiving compression
  458. rates as much as 20% better than squeezing, and sometimes even better.
  459. Huffman squeezing depends on some bytes being more "popular"
  460. than others, taking the file as a whole.  Lempel-Zev compression is
  461. instead looking for long strings of bytes which are repeated at
  462. various points (such as an end of line followed by spaces for
  463. indentation).  Lempel-Zev compression is therefor looking for
  464. repetition at a more "macro" level, often acheiving impressive packing
  465. rates.
  466.  
  467. Alas, nothing ever comes free.  This gain in storage efficiency comes
  468. at the price of processor time.  ARC version 4.0 will usually take
  469. about twice as long to add a file to an archive as version 3.1 did.
  470. We intend to work on improving this in the future, but it will always
  471. be slower since it must now work much harder to determine the best
  472. packing method.
  473.  
  474. Fortunatly, file extraction is only slightly slower, to the point
  475. where it will probably go unnoticed.
  476.  
  477. In the typical case a file is added to an archive once and then
  478. extracted many times, so the increased time for an update should more
  479. than pay for itself in increased disk space and reduced file
  480. transmission time.
  481.  
  482. As usual, ARC version 4.0 is completely upward compatible.  That is,
  483. it can deal properly with any archive created by any earlier version
  484. of ARC.  It is NOT reverse compatible.  Archives created by ARC 4.0
  485. will generally not be usable by earlier versions of ARC.
  486.  
  487.  
  488.  
  489.                         CHANGES IN VERSION 4.1
  490.                         ======================
  491.  
  492. Version 4.1 does not contain any major changes from version 4.0.
  493. Lempel-Zev coding has been improved somewhat by performing non-repeat
  494. compression on the data before it is coded (as was already done with
  495. Huffman squeezing).  This has the two fold advantage of (a) reducing
  496. to some extent the amount of data to be encoded, and (b) increasing
  497. the time it takes for the string table to fill up.  Performance gains
  498. are small, but noticable.
  499.  
  500. The primary changes are in internal organization.  ARC is now much
  501. "cleaner" inside.  In addition to the esthetic benefits to the author,
  502. this should make life easier for the hackers out there.  There is also
  503. a slight, but not noticable, improvement in overall speed when doing
  504. an update.
  505.  
  506. Version 4.1 is still fully upward compatible.  But regretfully, it is
  507. again not downward compatible.  Version 4.1 can handle any existing
  508. archive, but creates archives which older versions (including 4.0)
  509. cannot unpack.
  510.  
  511.  
  512.  
  513.                         CHANGES IN VERSION 4.3
  514.                         ======================
  515.  
  516. Version 4.3 adds the much-demanded feature of using pathnames when
  517. adding files to an archive.  For obscure technical reasons, files
  518. being extracted still go in the current directory on the current
  519. drive.  Pathnames are also not supported for any of the other
  520. commands, because it would make no sense.
  521.  
  522. Version 4.3 is also using a slightly different approach when adding a
  523. file to an archive.  The end result is twofold:
  524.  
  525. 1) Slightly more disk space is required on the drive containing the
  526.    archive.  This should only be noticeable to those creating very
  527.    large archives on a floppy based system.
  528.  
  529. 2) A 30% reduction in packing time has been achieved in most cases.
  530.    This should be noticeable to everyone.
  531.  
  532. As always, version 4.3 is still fully upwards compatible, and is
  533. backwards compatible as far as version 4.1.
  534.  
  535.  
  536.  
  537.                       PROGRAM HISTORY AND CREDITS
  538.                       ===========================
  539.  
  540. In its short life thus far, ARC has astounded us with its popularity.
  541. We first wrote it in March of 1985 because we wanted an archive
  542. utility that used a distributive directory approach, since this has
  543. certain advantages over the more popular central directory approach.
  544. We added automatic squeezing in version 2 at the prompting of a
  545. friend.  In version 2.1 we added the code to test for the best
  546. compression method.  Now (in August of 1985) we find that our humble
  547. little program has spread across the country, and seems to have become
  548. a new institution.
  549.  
  550. We are thankful for the support and appreciation we have received.  We
  551. hope that you find this program of use.
  552.  
  553.  
  554. If we have acheived greatness, it is because we have stood upon the
  555. shoulders of giants.  Nothing is created as a thing unto itself, and
  556. ARC is no exception.  Therefore, we would like to give credit to the
  557. following people, without whose efforts ARC could not exist:
  558.  
  559.  
  560. Brian W. Kernighan and P. J. Plauger, whose book "Software Tools"
  561. provided many of the ideas behind the distributive directory approach
  562. used by ARC.
  563.  
  564. Dick Greenlaw, who wrote the public domain SQ and USQ programs, in
  565. which the Huffman squeezing algorithm was first developed.
  566.  
  567. Robert J. Beilstein, who adapted SQ and USQ to Computer Innovations
  568. C86 (the language we use), thus providing us with important parts of
  569. our squeezing logic.
  570.  
  571. Kent Williams, who graciously allowed us to use his LZWCOM and LZWUNC
  572. programs as a basis for our Lempel-Zev compression logic.
  573.  
  574. David Schwaderer, whose article in the April 1985 issue of PC Tech
  575. Journal provided us with the logic for calculating the CRC 16 bit
  576. polynomial.
  577.  
  578.  
  579. And many, many others whom we could not identify.
  580.